﻿@model GitCandy.Models.TeamListModel

@{
    ViewBag.Title = string.Format(SR.Shared_TitleFormat, SR.Team_ListTitle);
}

<h3>@SR.Team_ListTitle</h3>

@using (Html.BeginForm("Index", "Team", FormMethod.Get))
{
<div class="row">
    <div class="form-group col-md-5">
        <div class="input-group">
            <input type="text" name="query" class="form-control" />
            <span class="input-group-btn">
                <button type="submit" class="btn btn-default">@SR.Shared_Search</button>
            </span>
        </div>
    </div>
</div>
}

<div>
    <div class="pull-left">@string.Format(SR.Team_TeamsFound, Model.ItemCount)</div>
    <div class="pull-right">@Html.ActionLink(SR.Shared_Create, "Create", null, new { @class = "btn btn-primary" })</div>
</div>
<table class="table table-hover table-striped">
    <thead>
        <tr>
            <th>@SR.Team_Name</th>
            <th>@SR.Team_Description</th>
        </tr>
    </thead>
    <tbody>
        @foreach (var item in Model.Teams)
        {
            <tr>
                <td>@Html.ActionLink(item.Name, "Detail", new { name = item.Name })</td>
                <td>@item.Description</td>
            </tr>
        }
    </tbody>
</table>
@Html.Partial("../Shared/_Pager")